Optimal. Leaf size=68 \[ \frac{b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac{3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}-\frac{a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+3 a b^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.119885, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {2792, 3023, 2735, 3770} \[ \frac{b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac{3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}-\frac{a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+3 a b^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2792
Rule 3023
Rule 2735
Rule 3770
Rubi steps
\begin{align*} \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx &=-\frac{a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\int \csc (e+f x) \left (3 a^2 b+3 a b^2 \sin (e+f x)-b \left (a^2-b^2\right ) \sin ^2(e+f x)\right ) \, dx\\ &=\frac{b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac{a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\int \csc (e+f x) \left (3 a^2 b+3 a b^2 \sin (e+f x)\right ) \, dx\\ &=3 a b^2 x+\frac{b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac{a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\left (3 a^2 b\right ) \int \csc (e+f x) \, dx\\ &=3 a b^2 x-\frac{3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}+\frac{b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac{a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\\ \end{align*}
Mathematica [A] time = 0.517057, size = 87, normalized size = 1.28 \[ \frac{a^3 \tan \left (\frac{1}{2} (e+f x)\right )+a^3 \left (-\cot \left (\frac{1}{2} (e+f x)\right )\right )+6 a b \left (a \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )-a \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )+b (e+f x)\right )-2 b^3 \cos (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.052, size = 72, normalized size = 1.1 \begin{align*} 3\,a{b}^{2}x-{\frac{{a}^{3}\cot \left ( fx+e \right ) }{f}}-{\frac{{b}^{3}\cos \left ( fx+e \right ) }{f}}+3\,{\frac{{a}^{2}b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}}+3\,{\frac{a{b}^{2}e}{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.65011, size = 92, normalized size = 1.35 \begin{align*} \frac{6 \,{\left (f x + e\right )} a b^{2} - 3 \, a^{2} b{\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, b^{3} \cos \left (f x + e\right ) - \frac{2 \, a^{3}}{\tan \left (f x + e\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.73625, size = 266, normalized size = 3.91 \begin{align*} -\frac{3 \, a^{2} b \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) - 3 \, a^{2} b \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a^{3} \cos \left (f x + e\right ) - 2 \,{\left (3 \, a b^{2} f x - b^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.33008, size = 197, normalized size = 2.9 \begin{align*} \frac{6 \,{\left (f x + e\right )} a b^{2} + 6 \, a^{2} b \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) + a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \frac{2 \, a^{2} b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 2 \, a^{2} b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 4 \, b^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + a^{3}}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]